<?php

namespace App\Library\Requests\BuyWill;

use App\Library\Requests\Base\BaseDTORequest;
use App\Library\Rules\MediaImgRule;

class BuyWillAddRequest extends BaseDTORequest
{
    public function rules(): array
    {
        return [
            'title' => 'required|string|max:255',
            'fileId' => ['required', 'string', 'size:20', new MediaImgRule],
            'description' => 'nullable|string|max:255',
            'originalPrice' => 'nullable|decimal:2|min:0',
            'price' => 'nullable|decimal:2|min:0',
            'stock' => 'nullable|integer|min:0',
            'limit' => 'nullable|integer|min:0'
        ];
    }
}
